<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <script src="../node_modules/vue/dist/vue.js"></script>
  </head>

  <body>
    <div id="app">
      <my-cpn></my-cpn>
    </div>
    <script>
      const com = Vue.extend({
        template:`<div>
          <h2>组件1号准备</h2>
          <p>斩将把其</p>
          <p>看二等拆标买手</p>
          </div>`
      })
      // 组件必须挂载到vue实例上
      Vue.component("my-cpn",com)

      var vm = new Vue({
        el: "#app",
        data: {},
        methods: {},
      });
    </script>
  </body>
</html>
